package com.sharemarking.wa.platform.controller;

import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.platform.service.CmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dxy
 */
@RestController
@RequestMapping(value = "cms")
public class CmsController {
    @Autowired
    CmsService cmsService;

    /**
     * 获取更多资讯栏目列表
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getMostNesChannelList")
    public ResponseParams<?> getMostNesChannelList() throws Exception {
        return cmsService.getMostNesChannelList();
    }

    /**
     * 获取cms栏目文章列表
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getCmsPostList")
    public ResponseParams<?> getCmsPostList() throws Exception {
        return cmsService.getCmsPostList();
    }

    /**
     * 获取cms文章详情
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getCmsPostInfo")
    public ResponseParams<?> getCmsPostInfo() throws Exception {
        return cmsService.getCmsPostInfo();
    }

    /**
     * 分享的文章详情
     * @return
     * @throws Exception
     */
    @ResponseBody
    @RequestMapping(value = "getArticle")
    public void getArticle() throws Exception {
        cmsService.getArticle();
    }




}
